Check Action Type#712
Open
MentalGear wants to merge 7 commits intohill-a:masterfrom
Open
Conversation
Collaborator
|
Hello, |
Author
|
OK, added tests. I'm not sure though if it's the right approach to check each step of the base env if the action type received is compatible, as it seems a bit of unnecessary overhead. Maybe just check on the first run ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#707
Description
TypeError: 'int' object is not subscriptableRan a couple time into this bug, and found it really hard to debug within stable baselines.
To spare others (as well as my future self) much frustration I would suggest to add a type check to wrapper envs like dummyEnv (or only check_env?) before using the action to make sure it's an iterable, before continuing with the code.
The following assertion will give a developer friendly error message that's easy to understand and offers an immediate solution, saving much frustration.
Motivation and Context
#707
closes #707
Types of changes
Checklist:
pytestandpytypeboth pass (by runningmake pytestandmake type).